Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve extensiblity for SwaggerGenerator #1241

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

KingJiangNet
Copy link

Expose ApiExplorer to make SwaggerGenerator more extensible, rather than using other heavy tools such as NSwag.

@domaindrivendev
Copy link
Owner

I don't believe this PR is necessary. You can already access ApiExplorer from the HttpConfiguration object:

var apiExplorer = httpConfig.Services.GetApiExplorer();

@KingJiangNet
Copy link
Author

@domaindrivendev ,
The purpose of exposing ApiExplorer is for replacing the default api explorer, so that we can have plenty of possibilities to extend this tool, such as loading api from external assemblies, and even encapsulate some non-WebApi to standard WebApi through some dynamic design. If there is no such dynamic support, its scope is limited too much. Actually NSwag did some(it claims it is a super set of Smashbukke) , but it seems too heavy and not that flexible.

@domaindrivendev
Copy link
Owner

Thx for the explanation. You can already do that too. Use httpConfig.Services.Replace

@KingJiangNet
Copy link
Author

KingJiangNet commented May 22, 2018

Yes, it is a way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants